$(function(){
	$("form").submit(function(){
		$(this).slideUp('slow', function(){
			var res = null;
			$(this).ajaxSubmit({
				async: false,
				success: function(data, state, xhr, $form){
					$form.clearForm();
					$form.slideDown('slow');
					res = data;
				},
				error: function(xhr){
					console.log(xhr);
				},
			});
		});
		return false;
	});

});
